<include file="./App/Admin/View/Common/header.html"/>
    <!-- Start Main Wrapper -->
    <div id="mws-wrapper">
    
        <!-- Necessary markup, do not remove -->
        <div id="mws-sidebar-stitch"></div>
        <div id="mws-sidebar-bg"></div>
        
        <!-- Sidebar Wrapper -->
        <div id="mws-sidebar">
        
            <!-- Searchbox -->
            <div id="mws-searchbox" class="mws-inset">
                <form action="http://www.malijuthemeshop.com/themes/mws-admin/1.5/typography.html">
                    <input type="text" class="mws-search-input" />
                    <input type="submit" class="mws-search-submit" />
                </form>
            </div>
            
            <!-- Main Navigation -->
            <div id="mws-navigation">
                <include file="./App/Admin/View/Common/left_nav.html"/>
            </div>            
        </div>
        
        <!-- Main Container Start -->
        <div id="mws-container" class="clearfix">
        
            <!-- Inner Container Start -->
            <div class="container">

                <div class="mws-panel grid_6">
                    <div class="mws-panel-header">
                        <span>修改商品信息</span>
                    </div>
                    <div class="mws-panel-body no-padding">
                        <form class="mws-form" action="{:U('Goods/edit_doit')}" method="post" enctype="multipart/form-data">
                            <input type="hidden" name="id" value="{$gid}">
                            <input type="hidden" name="cover" value="{$data.cover}">
                            <div class="mws-form-inline">
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">商品分类</label>
                                    <div class="mws-form-item">
                                        <select class="small" name="category_id">
                                           {$cateOptions}
                                        </select>
                                    </div>
                                </div>
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">商品名称</label>
                                    <div class="mws-form-item">
                                        <input type="text" class="large require" name="title" value="{$data[
                                        'title']}">
                                    </div>
                                </div>
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">抽屉</label>
                                    <div class="mws-form-item">
                                        <select class="small" name="drawer_id">
                                           <foreach name="drawer_list" item="vo">
                                            <option value="{$key}" <if condition="$data.drawer_id eq $key">selected</if>>{$vo}</option>
                                           </foreach>
                                        </select>
                                    </div>
                                </div>
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">所属平台</label>
                                    <div class="mws-form-item">
                                        <select class="small" name="source">
                                           <foreach name="source_option" item="vo">
                                            <option value="{$key}" <if condition="$data.source eq $key">selected</if>>{$vo}</option>
                                           </foreach>
                                        </select>
                                    </div>
                                </div>
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">平台商品地址</label>
                                    <div class="mws-form-item medium">
                                        <input type="text" class="mws-textinput" name="link" value="{$data.link}">
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label>推广地址</label>
                                    <div class="mws-form-item medium">
                                        <input name="union_link" type="text" class="mws-textinput" value="{$data.union_link}" />
                                    </div>
                                </div>
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">商品原价</label>
                                    <div class="mws-form-item">
                                        <input type="text" class="large require" name="ori_price" value="{$data['ori_price']}">
                                    </div>
                                </div>
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">商品现价</label>
                                    <div class="mws-form-item">
                                        <input type="text" class="large require" name="cost_price" value="{$data['cost_price']}">
                                    </div>
                                </div>
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">商品描述</label>
                                    <div class="mws-form-item">
                                        <textarea rows="" cols="" class="large require" name="desc" id="myEditor">{$data['desc']}</textarea>
                                    </div>
                                </div>

                                <div class="mws-form-row bordered">
                                        <label class="mws-form-label">原图</label>
                                        <img src="__PUBLIC__/Uploads/{$data.cover}" width="100px" />
                                        <div class="mws-form-item">
                                            <input type="file" name="img" class="required">
                                            <label for="picture" class="error" generated="true" style="display:none"></label>
                                        </div>
                                </div>
                            </div>
                            <div class="mws-button-row">
                                <input type="submit" value="提交" class="btn btn-danger">
                                <input type="reset" value="重置" class="btn ">
                            </div>
                        </form>
                    </div>      
                </div>
            </div>
<include file="./App/Admin/View/Common/footer.html"/>